<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>入党申请</title>
    <link rel="stylesheet" href="../../addons/party_member/public/css/weui.min.css">
    <link rel="stylesheet" href="../../addons/party_member/public/css/jquery-weui.min.css">

    <!-- body 最后 -->
    <script src="../../addons/party_member/public/js/jquery.min.js"></script>
    <script src="../../addons/party_member/public/js/jquery-weui.min.js"></script>

    <!-- 如果使用了某些拓展插件还需要额外的JS -->
    <script src="../../addons/party_member/public/js/swiper.min.js"></script>
    <script src="../../addons/party_member/public/js/city-picker.min.js"></script>
    <script src="../../addons/party_member/public/js/function.js"></script>
    <style>
        body{
            margin: 0px;
            padding: 0px;

        }
        .box{
            position: absolute;
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            background: url("../addons/party_member/public/image/login/loginbg.png") no-repeat;
            background-size: cover;

        }
        .success{
            position: absolute;
            z-index: 99;
            bottom: -100%;
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            background: url("../addons/party_member/public/image/joinParty/success.jpg") no-repeat;
            background-size: 100% 100%;
        }
        .head_return{
            display: inline-block;
            position: absolute;
            left: 10px;
            top: 10px;
            width: 20px;
            height: 23px;
            background: url("../addons/party_member/public/image/evaluation/return.png") no-repeat;
            background-size: 12px 23px;

        }
        .btn{
            text-align: center;
            margin-top: 30px;
            padding: 0 10px;
        }


        .footer{
            position: absolute;
            bottom: 0px;
            height: 50px;
            width: 100%;
            line-height: 50px;
            text-align: center;
            color: #ffffff;
        }
        .footer div{
            margin: auto;
            width: 92%;
            height: 1px;
            background-color: #ffffff;
            display: block;
        }

        .weui-cell:before{
            content: " ";
            position: absolute;
            left: 0;
            top: 18px;
            right: 0;
            height: 35px;
            border-left: 3px solid red;
            /* color: red; */
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
            left: 2px;
            width: 6px;
        }
        .weui-cell:after{
            content: " ";
            position: absolute;
            bottom: 0;
            right: 15px;
            height: 1px;
            border-top: 2px solid #ffffff;
            color: #d9d9d9;
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
            left: 15px;
        }
        .weui-cells:after{
            border: none;
        }
        .weui-cells:before{
            content: " ";
            position: absolute;
            left: 0;
            top: 18px;
            right: 0;
            height: 35px;
            border-left: 3px solid red;
            /* color: red; */
            -webkit-transform-origin: 0 0;
            transform-origin: 0 0;
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
            left: 2px;
            width: 6px;
        }
        @media screen and (max-height: 400px) {
            .footer {
                display: none;
            }
        }

    </style>
</head>
<body>
<div class="box">
    <div class="weui-cells__title" style="font-weight: bold;color:#000000;margin-top:0px;background-color: #ffffff;height: 43px;text-align: center;font-size: 18px;line-height: 43px;">
        <span class="head_return"></span>
        入党申请
    </div>
    <div class="weui-cells weui-cells_form" style="margin-top: 0px;background: none;color: #ffffff;border: none">
        <div class="weui-cell"  style="height: 35px">
            <div class="weui-cell__hd" style="color: #688b6e"><label class="weui-label" >申请人姓名：</label></div>
            <div class="weui-cell__bd" style="color: #688b6e">
                <input class="weui-input" name="name"  type="text"  placeholder="申请人姓名">
            </div>
        </div>
        <div class="weui-cell"  style="height: 35px;">
            <div class="weui-cell__hd" style="color: #688b6e"><label class="weui-label">身份证号码：</label></div>
            <div class="weui-cell__bd" style="color: #688b6e">
                <input class="weui-input" name="userCode" type="number"  placeholder="身份证号码">
            </div>
        </div>

        <div class="weui-cell"  style="height: 35px;">
            <div class="weui-cell__hd" style="color: #688b6e"><label class="weui-label">手机号：</label></div>
            <div class="weui-cell__bd" style="color: #688b6e">
                <input class="weui-input" name="phone" type="number"  placeholder="手机号">
            </div>
        </div>

        <div class="weui-cell"  style="height: 35px">
            <div class="weui-cell__hd" style="color: #688b6e"><label class="weui-label" >介绍人姓名：</label></div>
            <div class="weui-cell__bd" style="color: #688b6e">
                <input class="weui-input" name="introducer"  type="text"  placeholder="介绍人姓名">
            </div>
        </div>
        <div class="weui-cell weui-cell_select weui-cell_select-after" style="height: 55px">
            <div class="weui-cell__hd" style="color: #688b6e">
                <label for="" class="weui-label">支部名称</label>
            </div>



            <div class="weui-cell__bd" style="color: #688b6e">
                <select class="weui-select" id="select" name="select" >
                    {loop $data['list']  $index $item}
                    <option value="{$item['id']}">{$item['partyname']}</option>
                    {/loop}
                </select>
            </div>
        </div>

        <div class="weui-cell"  style="height: 35px">
            <div class="weui-cell__hd" style="color: #688b6e"><label class="weui-label" >入党申请：</label></div>
            <div class="weui-cell__bd" style="color: #688b6e">
                <input class="weui-input" name="apply"  type="text"  placeholder="入党申请">
            </div>
        </div>
    </div>
    <div class="btn">
        <input class="weui-btn  weui-btn_warn" type="submit" name="subimt" value="确认提交"/>
    </div>
    <!--<div class="footer">
        <div></div>
        <p>忘记密码请联系支部管理员</p>
    </div>-->
</div>
<!--<div class="success" >
    <div>

    </div>
</div>-->
<script>

    $(function () {

        $('input[name="subimt"]').click(function () {
            var name=$('input[name="name"]').val();
            var userCode=$('input[name="userCode"]').val();
            var introducer=$('input[name="introducer"]').val();
            var select=$('#select').val();
            var apply=$('input[name="apply"]').val();
            var phone = $('input[name="phone"]').val();
            console.log(select);

            if (name==""){
                $.alert("请输入申请人姓名");
                return
            }
            if(userCode==""){
                $.alert("请输入身份证");
                return
            }

            if(phone==""){
                $.alert("请输入手机号");
                return
            }

            if (introducer==""){
                $.alert("请输入介绍人姓名");
                return
            }
            if(select==""){
                $.alert("请选择支部");
                return
            }
            if(apply==""){
                $.alert("请输入入党申请");
                return
            }

            $.showLoading();
            $.post('{php echo $this->createMobileUrl("joinAjax")}',{
                name:name,
                userCode:userCode,
                phone:phone,
                introducer:introducer,
                select:select,
                apply:apply
            },function (data) {
                $.hideLoading();
                if(data['status']){
                    $.alert(data['result'], "提示");
                }else{
                    $.alert(data['result'], "提示");
                }
            },'json')
        })

       /* function success() {
            $(".success").animate({bottom:"-43px"},function () {
                setTimeout("window.history.go()",1000);
            });

        }
*/

    })
</script>
</body>
</html>